package com.itheima.day11;

import java.util.Random;

public class Test9 {
    public static void main(String[] args) {
        int[] arr = {3,1,2,4,0,0,0,5};
        Random r = new Random();
        int index = r.nextInt(arr.length);
        int num = arr[index];
        if(num != 0){
            System.out.println("恭喜你中了" +num+"等奖");
        }else {
            System.out.println("再接再厉");
        }
    }
}
